<?php
/**
 * Created by PhpStorm.
 * User: Inhere
 * Date: 2015/1/30
 * Use : ...
 * File: Datastorage.php
 */

namespace ulue\libs\datastorage;

class Datastorage extends AbstractDatastorage
{

    /**
     * 设置配置值
     * @see TraitUseDatastorage::set()
     * @param array|string $path
     * @param $value
     * @param bool $createNode
     * @throws DatastorageException
     * @return $this|mixed
     */
    public function set($path, $value, $createNode=false)
    {
        // 此时载入数据到 $this->box
        if (is_array($path))
        {
            return $this->bindData($path);
        }

        return parent::set($path, $value, $createNode);
    }

}// end class Datastorage